const express    = require('express')
const expressJoi = require('@escook/express-joi')
const router     = express.Router()
// 导入用户路由处理函数对应的模块
const userHandler = require('../router_handler/user')
// 2. 导入需要的验证规则对象
const { reg_login_schema } = require('../schema/user')
// 注册新用户
router.post('/reguser', expressJoi(reg_login_schema), userHandler.regUser)
// 登录的路由
router.post('/login', expressJoi(reg_login_schema), userHandler.login)
//  向外共享
module.exports = router
